package com.cgly.medical.controller;

import com.cgly.medical.domain.AppointmentTime;
import com.cgly.medical.mapper.AppointmentTimeMapper;
import com.cgly.medical.service.AppointmentTimeService;
import com.cgly.medical.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 黄浩然
 */
@RestController
@RequestMapping("/api/appointment_time")
@CrossOrigin  //解决跨域问题
public class AppointmentTimeController {

    @Autowired
    private AppointmentTimeService appointmentTimeService;

    @GetMapping("/{doctorId}")
    public Msg selectAppointmentTimeByDoctorId(@PathVariable("doctorId") Long doctorId) {
        Msg msg = appointmentTimeService.selectAppointmentTimeByDoctorId(doctorId);
        return msg;
    }
}
